package cn.minhx.lab.design_patterns.template_method.f2;

public abstract class OcrClient {

    public String execute(String url) {
        // 1. 获取token
        String accessToken = getAccessToken();
        // 2. post
        String body = post(url, accessToken);
        // 3. 解析结果
        return parseResult(body);
    }

    protected abstract String getAccessToken();
    protected abstract String post(String url, String accessToken);
    protected abstract String parseResult(String body);

}
